﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KmSql
{
    public interface IKmSql
    {
        string ConnectionString { get; }
        IAdo Ado { get; }
        Task<List<T>> ToListAsync<T>() where T : class;
        Task<T?> FindAsync<T>(object keyValue) where T : class;
        Task<int> AddAsync<T>(T entity) where T : class;
        Task<int> UpdateAsync<T>(T entity) where T : class;
        Task<int> DeleteAsync<T>(object keyValue) where T : class;
    }
}
